#pragma once

typedef unsigned long cycles_t;

static inline cycles_t get_cycles(void)
{
    cycles_t time_elapsed;

    __asm__ volatile("rdtime %0" : "=r"(time_elapsed));

    return time_elapsed;
}
